{if $tourney eq 0}
<form id="new">
    <table>
        <tbody>
        <tr height="13">
            <td width="22%">Fecha Inicio:</td>
            <td>
                <input id="date_begin" name="date_begin" size="10" readonly="readonly" />
                <img src="images/calendar_view_week.png" onclick="switchColor('date_begin',&#034;#999999&#034;);displayCalendar($('date_begin'),'yyyy.mm.dd',this)" />
            </td>
        </tr>
        <tr height="13">
            <td>Fecha Final:</td>
            <td>
                <input id="date_end" name="date_end" size="10" readonly="readonly" />
                <img src="images/calendar_view_week.png" onclick="switchColor('date_end',&#034;#999999&#034;);displayCalendar($('date_end'),'yyyy.mm.dd',this)" />
            </td>
        </tr>
        <tr height="13">
            <td>N&uacute;m. de rondas:</td>
            <td>
                <input id="num_rounds" name="num_rounds" size="2" maxlength="1" onkeypress="return onlyNumbers(event);" onfocus="switchColor('num_rounds',&#034;#999999&#034;);" />
            </td>
        </tr>
        <tr>
            <td>Piscinas:</td>
            <td>
                <table id="places">
                    <tbody>
                    <tr>
                        <td>
                            <input id="plc_1" name="places[]" size="20" />
                        </td>
                        <td id="img_1">
                            <img src="images/add.png" class="plus_minus" alt="Nueva fila" title="Nueva fila" onclick="addPoolItem('places','plc_1','img_1');" />
                        </td>
                    </tr>
                    </tbody>
                </table>
            </td>
        </tr>
        <tr>
            <td />
            <td>
                <input class="button" type="button" value="Crear" onclick="if(validate_tourney()) send('new','content_area','Tourney/WP_Tourney.php?action=3');" />
                <input class="button" type="reset" value="Limpiar" />
            </td>
        </tr>
        </tbody>
    </table>
</form>
{else}
<p>Datos actuales del torneo:</p>
<table>
    <tbody>
    <tr height="24">
        <td width="22%">Fecha Inicio (aaaa.mm.dd):</td>
        <td>
            <p style="padding: 2px;margin:0;" id="trn_date_begin">{$tourney.trn_date_begin}</p>
            <script type="text/javascript">
                inplaceeditor('','trn_date_begin','Tourney/WP_Tourney.php?action=4');
            </script>
        </td>
    </tr>
    <tr height="24">
        <td>Fecha Final (aaaa.mm.dd):</td>
        <td>
            <p style="padding: 2px;margin:0;" id="trn_date_end">{$tourney.trn_date_end}</p>
            <script type="text/javascript">
                inplaceeditor('','trn_date_end','Tourney/WP_Tourney.php?action=4');
            </script>
        </td>
    </tr>
    <tr height="24">
        <td>N&uacute;m. de rondas:</td>
        <td>
            <p style="padding: 2px;margin:0;" id="trn_num_rounds">{$tourney.trn_num_rounds}</p>
            <script type="text/javascript">
                inplaceeditor_area('','trn_num_rounds','Tourney/WP_Tourney.php?action=4',1,3);
            </script>
        </td>
    </tr>
    <tr>
        <td>Cupo total:</td>
        <td>
            <p style="padding: 2px;margin:0;" id="delegs">{$tourney.trn_num_delegations} Delegaciones</p>
        </td>
    </tr>
    </tbody>
</table>
{/if}